package com.rjpacket.chileme.app.models;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

/**
 * Created by aaa on 15-3-22.
 */
public class Icon implements Serializable {
    private int index;// 3,
    private String name;// "可使用微信、支付宝、手机QQ进行在线支付",
    private String color;// "238, 96, 37",
    private String text;// "可使用微信、支付宝、手机QQ进行在线支付",
    private String id;// "付",
    private boolean is_activity;// false

    public void parseJSON(JSONObject json){
        try {
            index = json.getInt("index");
            name = json.getString("name");
            color = json.getString("color");
            text = json.getString("text");
            id = json.getString("id");
            is_activity = json.getBoolean("is_activity");
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }
}
